import axios from "axios";

const axiosInstance = axios.create({
    baseURL: 'http://127.0.0.1:8080',
})
axios.interceptors.request.use( config => {
    const token = localStorage.getItem("jwt");
    if (token) {
        config.headers.Authorization = `Bearer ${token}`;
    }
    return config;
}, error => {
    return Promise.reject(error);
})
export default axiosInstance;